<html>
<head>
	<title>pyssh</title>
	<style type=text/css>
		h1 {
			font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif;
			font-size: 130%;
			color: darkblue;
		}

		h2 {
			font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif;
			font-size: 115%;
		}

		pre {
			background-color: #eee;
		}

		td.title {
			font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif;
			font-size: 145%;
			font-weight: bold;
			text-align: center;
			background-color: #eef;
		}

	</style>

</head>
<body>

<table width=100%>
	<tr>
		<td class=title>
			PySSH
		</td>
	</tr>
</table>


<h1>Introduction</h1>


<h2>What is PySSH?</h2>

<p> PySSH is a Python library for programmatically controlling <i>ssh</i> and <i>scp</i>.


<h2>Give me an example.</h2>

<pre>
import pyssh
pyssh.run('date', host=HOST, user=USER)
</pre>

<p> You can also add a <b>password=PASSWORD</b> argument, if you haven't set up RSA key pairs.


<h2>Who developed PySSH?</h2>

<p> Chuck Esterbrook with examples (and code lifted) from Drew McDowell and Adam Grzegorz.


<h2>How mature is PySSH?</h2>

PySSH has been tested on and works with Linux. However, there are some bizarre characteristics of the module including time.sleep() call without which it won't work, as well as merged stdin and stdout from the ssh child process. Your mileage may vary.


<h2>Where can I get releases and news?</h2>

<p> At the home page at <a href=http://pyssh.sourceforge.net>http://pyssh.sourceforge.net/</a>.


<h2>How can I contribute?</h2>

<p> Check the <a href=to_do.txt>To Do list</a> if you're looking for something, or inquire on the discussion list. Share any patches, enhancements, modules, docs, etc. that you wish via the discussion list as well. <a href=mailto:pyssh-discuss@lists.sourceforge.net>pyssh-discuss@lists.sourceforge.net</a>


<h2>License</h2>

<p> We use the Python license. See <a href=license.txt>license.txt</a>.


<h1>Getting Started</h1>


<h2>Requirements</h2>

<p> PySSH requires Python 2.0 or greater and uses the <i>pty</i> module found in Python, but only for IRIX and Linux. If you can use PySSH on other platforms, particularly some flavor of POSIX, please let us know.


<h2>Installation</h2>

<p> For a single user, copy the pyssh.py module to a location in your PYTHONPATH.

<p> For a system, become the administrator and run <b>python setup.py install</b> at the
command prompt.


<h2>Testing your installation</h2>

The <b>pyssh.py</b> module can be run as a program with command line arguments to run ssh. This is useful for testing:

<pre>&gt; python pyssh.py host=HOST user=USER command=date password=PASSWORD
</pre>

<p> You can skip the password if you have set up RSA key pairs.

<p> If this doesn't work, try using your ordinary ssh program first:

<pre>&gt; ssh USER@HOST COMMAND
</pre>

<p> If <b>ssh</b> works, but <b>pyssh</b> does not, turn debugging on with "debug=1" passed on the command line and contact <a href=mailto:pyssh-discuss@lists.sourceforge.net>pyssh-discuss</a>.


<h1>Using PySSH</h1>

<h2>run()</h2>

The run() function is the most basic way to use pyssh:

<pre>import pyssh
pyssh.run('date', host=HOST, user=USER, password=PASSWORD)
</pre>

<p> The doc string contains more info. The source code for pyssh contains additional classes and functionality you can read through.


<h1>Links</h1>

<p> Docs:
	<ul>
		<li> <a href=to_do.txt>To Do</a>
		<li> <a href=license.txt>License</a>
	</ul>

<p> PySSH home:
	<ul>
		<li> <a href=http://pyssh.sourceforge.net/>http://pyssh.sourceforge.net/</a>
	</ul>

<p> SSH info:
	<ul>
		<li> <a href=http://www.freebsddiary.org/secure-file-copy.php>http://www.freebsddiary.org/secure-file-copy.php</a>
		<li> <a href=http://securityportal.com/direct.cgi?/research/ssh-part1.html>http://securityportal.com/direct.cgi?/research/ssh-part1.html</a>
		<li> <a href=http://securityportal.com/direct.cgi?/research/ssh-part2.html>http://securityportal.com/direct.cgi?/research/ssh-part2.html</a>
	</ul>


<h1>Release Instructions</h1>

<p> This section contains instructions on how to cut a release.

@@


<p> <hr>
Copyright &copy; 2001 by the PySSH Development Team

</body>
</html>
